﻿namespace Digitalmes.Scada.Utils;

/// <summary>
/// 数值帮助类
/// </summary>
public static class NumberUtil
{
    /// <summary>
    /// Fix <see cref="double"/> 值
    /// </summary>
    /// <param name="value"></param>
    /// <param name="digits">小数位，默认为 1</param>
    /// <returns></returns>
    public static double Fix(double value, int digits = 1)
    {
        return Math.Round(value, digits);
    }
}
